import request from '@/utils/request'

// 新增基本信息详情 错误码 200350
export function postInstitution(data) {
  return request({
    url: "/system/institutions",
    method: "post",
    data,
  });
}

// 修改基本信息详情 错误码 200360
export function putInstitution(data) {
  return request({
    url: "/system/institutions",
    method: "put",
    data,
  });
}

// 获取用户所在部门详情 错误码 200370
export function getByDeptId(params) {
  return request({
    url: "/system/institutions/getByDeptId",
    method: "get",
    params,
  });
}

// 获取该部门下的用户集合  错误码 200380
export function getUserListByDept(params) {
  return request({
    url: "/system/user/getUserListByDept",
    method: "get",
    params,
  });
}

// 历年能耗信息
export function getoverYearlist(params) {
  return request({
    url: "/system/institutions/dept/electric/consumption",
    method: "get",
    params,
  });
}

// 历年总能耗
export function getoverYeartotalvalue(params) {
  return request({
    url: "/system/institutions/dept/electric/totalvalue",
    method: "get",
    params,
  });
}

// 办公场所信息
export function getofficeSpacelist(params) {
  return request({
    url: "/system/institutions/office/information/",
    method: "get",
    params,
  });
}

